package cn.edu.wynu.define;

import java.util.Scanner;

public class MethodTest05 {
    public static void main(String[] args) {
        // 案例二：判断一个整数是奇数还是偶数
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数：");
        int a = sc.nextInt();
        judge(a);
    }
    public static void judge(int a){
        if(a % 2 == 0){
            System.out.println(a + "是偶数");
        }else{
            System.out.println(a + "是奇数");
        }
    }
}
